1 using System;
2 using
UnityEngine;
3
4
5 public
static class GoEaseSinusoidal
6 {
7     
public static float EaseIn( float t, float b, float c, float d )
8     {
9         
return -c * (float)Math.Cos( t / d * ( Math.PI / 2 ) ) + c + b;
10     }
11
12     
public static float EaseOut( float t, float b, float c, float d )
13     {
14         
return c * (float)Math.Sin( t / d * ( Math.PI / 2 ) ) + b;
15     }
16
17     
public static float EaseInOut( float t, float b, float c, float d )
18     {
19         
return -c / 2 * ( (float)Math.Cos( Math.PI * t / d ) - 1 ) + b;
20     }
21 }



Trò chơi Angry Birds trong UNITY Engine 31.664 lượt xem

Gõ tìm kiếm nhanh...